from StringIO import StringIO
import sys
buff =StringIO()
temp = sys.stdout
sys.stdout = buff
print 42, 'hello', 0.001
sys.stdout =temp
print buff.getvalue()
